package org.come.control;

import org.come.action.FromServerAction;
import org.come.bean.ChatBean;
import org.come.until.GsonUtil;
import org.come.until.MessagrFlagUntil;
import org.come.until.UserMessUntil;

/**
 * 
 * @author 黄建彬
 * 
 *         添加好友，删除好友
 */
public class FriendChatControl implements FromServerAction {

	@Override
	public void controlMessFromServer(String mes, String type) {
		ChatBean chatbean = GsonUtil.getGsonUtil().getgson().fromJson(mes, ChatBean.class);
		MessagrFlagUntil.ReceiveMessage(chatbean, chatbean.getRolename());
		// 设置发送者的角色名
		UserMessUntil.setChatFriendName(chatbean.getRolename());
	}

}
